package com.controller;

import com.context.AppContext;
import com.model.domain.proceso.envio.subida.LogXmlTransferido;
import com.model.domain.usuario.opciones.OpcionTransferenciaEnvio;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import util.log.MiLogger;

public class DataXmlMarcoController 
extends AbstractDataXmlController
{
    public DataXmlMarcoController() {
        
    }
    
    @Override
    public void upload(HttpServletRequest request, HttpServletResponse response) throws Exception { 
        this.getUsuarioController().verificarPermiso(OpcionTransferenciaEnvio.SUBIR_XML_MARCO,request);
        
        MiLogger logger = MiLogger.getLogger(response,AppContext.getInstancia().getLoggerContext().getLoggerErrores());
        
        //super.upload_cargar(request, response);
        List<LogXmlTransferido> lista = proceso1_subirDataXml(logger,request,response);        
        proceso2_cargarDataXml(logger,request,response, lista, false);//cargar sin con control de envio
    }
    
    @Override
    public void menuSubirXml(HttpServletRequest request, HttpServletResponse response)throws Exception {
        super.menuSubirXml(request, response);
        request.getRequestDispatcher("/pagweb/transferencia/envios/cargardataxml_marco.jsp").forward(request, response);
    }

}

